<template>
  <div class="contentContainer">
    <Title title="模型申请实时数据"/>
    <div class="contentBox">
      <vue-seamless-scroll :data="list" class="case-item" :class-option="defaultOption(list)">
        <div class="itemBox" v-for="(item, index) in list" :key="index">
          <div class="topBox">
            <div class="info flex align-center justify-between">
              <div>
                <h3>申请人：test</h3>
                <div class="time">
                  申请时间：2023-05-15 18:00:00
                </div>
              </div>
              <el-tag type="success" v-if="index%2 == 0">已授权</el-tag>
              <el-tag type="danger" v-else>未授权</el-tag>
            </div>
          </div>
          <div class="subBox flex align-center justify-between">
            <div>
              <p>模型名称：某远程机动安全⻛险评估模型</p>
              <p>模型作者：admin</p>
            </div>
            <i class="el-icon-s-platform"></i>
          </div>
        </div>
      </vue-seamless-scroll>
    </div>
  </div>
</template>
<script>
import Title from './Title'
import vueSeamlessScroll from 'vue-seamless-scroll'

export default {
  name: '',
  props: {},
  components: {
    Title,
    vueSeamlessScroll
  },
  data() {
    return {
      list: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
    }
  },
  computed: {
    defaultOption() {
      return (data) => {
        return {
          step: 0.4, // 数值越大速度滚动越快
          limitMoveNum: data.length, // 开始无缝滚动的数据量 this.dataList.length
          hoverStop: true, // 是否开启鼠标悬停stop
          direction: 1, // 0向下 1向上 2向左 3向右
          openWatch: true, // 开启数据实时监控刷新dom
          singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
          singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
          waitTime: 0 // 单步运动停止的时间(默认值1000ms)
        }
      }
    }
  },
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {},
}
</script>
<style lang="scss" scoped>
.contentContainer {
  height: 100%;
  padding: 10px 16px;
  box-sizing: border-box;

  .contentBox {
    height: calc(100% - 65px);
    overflow: hidden;
    margin-top: 15px;

    .itemBox {
      margin-top: 16px;

      .topBox {
        border: 1px solid #f1f1f1;
        border-bottom: none;
        padding: 10px 16px;
        border-radius: 4px 4px 0 0;

        .info {
          h3 {
            font-size: 16px;
            margin: 0;
          }
        }

        .time {
          font-size: 14px;
        }
      }

      .subBox {
        background: #f1f1f1;
        padding: 10px 16px;
        border-radius: 0 0 4px 4px;

        div {
          width: calc(100% - 80px);

          p {
            font-size: 14px;
            margin: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }

        i {
          font-size: 38px;
          color: #ccc;
        }
      }
    }
  }
}
</style>
